/* 原生Django Admin - 现代化样式 */

/* 全局样式优化 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 0;
    padding: 0;
}

/* 头部导航优化 */
#header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-bottom: none;
}

#branding h1 {
    color: white !important;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    margin: 0;
    padding: 10px 20px;
}

#branding h1 a {
    color: white !important;
    text-decoration: none;
}

/* 用户工具栏 */
#user-tools {
    margin: 0 20px;
}

#user-tools a {
    color: rgba(255,255,255,0.9) !important;
    text-decoration: none;
    margin-left: 10px;
    transition: color 0.3s ease;
}

#user-tools a:hover {
    color: white !important;
}

/* 主内容区域 */
.colM {
    background: rgba(255,255,255,0.95);
    border-radius: 15px;
    margin: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
}

.colSM {
    background: rgba(255,255,255,0.95);
    border-radius: 15px;
    margin: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
}

#content {
    padding: 30px;
}

/* 模块卡片 */
.module {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: none;
}

.module:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.module h2 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin: 0;
    padding: 15px 20px;
    font-weight: 600;
    border-radius: 0;
}

.module table {
    margin: 0;
    width: 100%;
}

.module th,
.module td {
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.module th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.module a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.module a:hover {
    color: #5a67d8;
}

/* 按钮样式 */
.button,
input[type="submit"],
input[type="button"],
.submit-row input,
.object-tools a {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    margin-right: 10px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.submit-row input:hover,
.object-tools a:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    filter: brightness(1.1);
}

.button.default {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    box-shadow: 0 2px 8px rgba(72, 187, 120, 0.3);
}

/* 表单样式 */
.form-row {
    margin-bottom: 15px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="url"],
textarea,
select {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
    width: 100%;
    max-width: 400px;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus,
input[type="url"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: scale(1.02);
}

/* 表格样式 */
.results {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin: 20px 0;
    border: none;
}

.results table {
    width: 100%;
    border-collapse: collapse;
}

.results thead th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    font-weight: 600;
    text-align: left;
    border: none;
}

.results tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.results tbody tr:hover {
    background: rgba(102, 126, 234, 0.05);
    transform: scale(1.005);
}

.results tbody td {
    padding: 12px 15px;
    vertical-align: middle;
}

/* 分页器 */
.paginator {
    text-align: center;
    margin: 30px 0;
}

.paginator a,
.paginator .this-page {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 5px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.paginator a {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.paginator a:hover {
    background: #667eea;
    color: white;
    transform: scale(1.05);
}

.paginator .this-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: 2px solid transparent;
}

/* 面包屑 */
.breadcrumbs {
    background: rgba(255,255,255,0.1);
    color: white;
    padding: 10px 20px;
    margin: 0;
    border-radius: 0;
}

.breadcrumbs a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: white;
}

/* 消息框 */
.messagelist {
    margin: 20px 0;
    padding: 0;
    list-style: none;
}

.messagelist li {
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 8px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.messagelist .success {
    background: linear-gradient(135deg, #d4f4dd 0%, #b8f2c4 100%);
    color: #2f855a;
    border-left: 4px solid #48bb78;
}

.messagelist .error {
    background: linear-gradient(135deg, #fde8e8 0%, #fbb6ce 100%);
    color: #c53030;
    border-left: 4px solid #f56565;
}

.messagelist .warning {
    background: linear-gradient(135deg, #fffaf0 0%, #fed7aa 100%);
    color: #c05621;
    border-left: 4px solid #ed8936;
}

/* 过滤器 */
#changelist-filter {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin: 20px 0;
    overflow: hidden;
}

#changelist-filter h3 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin: 0;
    padding: 15px 20px;
    font-weight: 600;
}

#changelist-filter li {
    margin: 0;
    border-bottom: 1px solid #f0f0f0;
}

#changelist-filter a {
    display: block;
    padding: 10px 20px;
    color: #495057;
    text-decoration: none;
    transition: all 0.2s ease;
}

#changelist-filter a:hover,
#changelist-filter a.selected {
    background: #667eea;
    color: white;
}

/* 搜索框 */
#toolbar {
    background: white;
    border-radius: 10px;
    padding: 15px 20px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#searchbar {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 14px;
    transition: all 0.3s ease;
    width: 300px;
    max-width: 100%;
}

#searchbar:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .colM, .colSM {
        margin: 10px;
    }
    
    #content {
        padding: 20px;
    }
    
    .results table {
        font-size: 12px;
    }
    
    .button, input[type="submit"], input[type="button"] {
        padding: 8px 15px;
        font-size: 13px;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.module {
    animation: fadeInUp 0.5s ease-out;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5a67d8;
}